home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 75 / XENIATGM75.iso / Shareware / X-Setup 5.0 / _SETUP.1 / XQ WinNT AutoShares 1.xpl < prev    next >
Text File  |  1999-06-12  |  2KB  |  68 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 5.0"
  2. "TYPE"="6"
  3. "COUNT"="2"
  4. "UIPATH"="Network\Security\Shares"
  5. "NAME"="CD-ROM/Floppy Shares"
  6. "VERSION"="1.31"
  7. "LANGUAGE"="VBScript"
  8. "TEXT 1"="Deactivate CD-ROM shares when logged on"
  9. "TEXT 2"="Deactivate floppy shares when logged on"
  10. "DESCRIPTION 1"="These options control what should happen with CD-ROM and floppy shares when a user loggs on."
  11. "DESCRIPTION 2"="By default, all shares on a machine are still accessible when a user loggs on."
  12. "DESCRIPTION 3"="If the options are activated, the shares are deactivated while a user is logged on. After this user loggs off, the shares are activated again."
  13. "AUTHOR"="Xteq Systems"
  14. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  15. "COMMENT 1"="For more information, go to http://www.xteq.com or write to TeXHeX@xteq.com."
  16.  
  17.  
  18.  
  19. sp="HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\"
  20. sV1="AllocateCDRoms"
  21. sV2="AllocateFloppies"
  22.  
  23. Sub Plugin_Initialize 
  24.  If GetWinVer=2 then
  25.   i=RegReadValue(sP&sV1)
  26.   if IsEmpty(i)=false then
  27.    if i=1 then Call SetUIElement(1,true)
  28.   end if
  29.  
  30.   i=RegReadValue(sP&sV2)
  31.   if IsEmpty(i)=false then
  32.    if i=1 then Call SetUIElement(2,true)
  33.   end if
  34.  
  35.  else
  36.   Disable
  37.  end if
  38.  
  39. End Sub
  40.  
  41. Sub Plugin_CheckData(ElementIndex)
  42. End Sub
  43.  
  44. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  45.  b=GetUIElement(1)
  46.  if b=true then
  47.    Call RegWriteValue(sP&sV1,"1",1)
  48.  else
  49.    Call RegWriteValue(sP&sV1,"0",1)
  50.  end if
  51.  
  52.  b=GetUIElement(2)
  53.  if b=true then
  54.    Call RegWriteValue(sP&sV2,"1",1)
  55.  else
  56.    Call RegWriteValue(sP&sV2,"0",1)
  57.  end if
  58.  
  59.  Restart
  60. End Sub
  61.  
  62.  
  63. Sub Plugin_Terminate 
  64. End Sub
  65.  
  66.  
  67.  
  68.